package com.inter.service.impl;

import com.inter.entity.bak.InternationalPayPackage;
import com.inter.entity.common.*;
import com.inter.mapper.PartnerProductPackageMapper;
import com.inter.service.PartnerProductPackageService;
import com.inter.service.PartnerService;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Setter
@Getter
@Transactional
@Service
public class PartnerProductPackageServiceImpl implements PartnerProductPackageService {
    @Resource
    PartnerProductPackageMapper partnerProductPackageMapper;

    /**
     * 兼容老版本H5的原始数据库的表，这边入库一份
     */
    @Override
    public void bak_storagePackage(InternationalPayPackage payPackage) {
        partnerProductPackageMapper.bak_storagePackage(payPackage);
    }

    @Override
    public String queryPartnerNameBypartnerCode(String partnerCode) {
        return partnerProductPackageMapper.queryPartnerNameBypartnerCode(partnerCode);
    }

    @Override
    public String queryContinent(String mccs) {

        return partnerProductPackageMapper.queryContinent(mccs);
    }

    @Override
    public String queryContinentEN(String mccs) {
        return partnerProductPackageMapper.queryContinentEN(mccs);
    }

    @Override
    public String queryCountryEN(String mccs) {
        return partnerProductPackageMapper.queryCountryEN(mccs);
    }

    @Override
    public void storagePackage(PartnerProductPackage product) {
        partnerProductPackageMapper.storagePackage(product);
    }

    @Override
    public int findPictureExistOrNot(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.findPictureExistOrNot(packageCode, partnerCode);
    }

    @Override
    public void storagePicture(DevicePackageCoverPicture picture) {
        partnerProductPackageMapper.storagePicture(picture);
    }

    @Override
    public void storageRefuelingPackage(PartnerProductPackage product) {

        partnerProductPackageMapper.storageRefuelingPackage(product);

    }

    @Override
    public int findPackageByPartnerCodeAndPackageCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.findPackageByPartnerCodeAndPackageCode(packageCode, partnerCode);
    }

    @Override
    public List<PartnerProductPackage> getProductListByPartnerCode(String partnerCode) {
        return partnerProductPackageMapper.getProductListByPartnerCode(partnerCode);
    }

    @Override
    public List<DevicePackageCoverPicture> getPictureByPartnerCodeAndPackageCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.getPictureByPartnerCodeAndPackageCode(packageCode, partnerCode);
    }

    @Override
    public List<DevicePackageMarketingStrategy> getStrategyByPartnerCodeAndPackageCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.getStrategyByPartnerCodeAndPackageCode(packageCode, partnerCode);
    }

    @Override
    public List<PartnerProductPackage> getProductListByPartnerCodeAndMcc(String partnerCode, String coverCountryMcc) {
        return partnerProductPackageMapper.getProductListByPartnerCodeAndMcc(partnerCode, coverCountryMcc);
    }

    @Override
    public int findPackageByPartnerCodeAndPackageCodeAndRefPackageCode(String packageCode, String partnerCode, String refPackageCode) {
        return partnerProductPackageMapper.findPackageByPartnerCodeAndPackageCodeAndRefPackageCode(packageCode, partnerCode, refPackageCode);
    }

    @Override
    public void storageRefPackage(PartnerProductRefPackage refPackage) {
        partnerProductPackageMapper.storageRefPackage(refPackage);
    }

    @Override
    public List<PartnerProductRefPackage> getRefPackageByPartnerCodeAndPackageCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.getRefPackageByPartnerCodeAndPackageCode(packageCode, partnerCode);
    }

    @Override
    public String queryPackageNameByCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.queryPackageNameByCode(packageCode, partnerCode);
    }

    @Override
    public String queryPackageName(String packageName, String partnerCode) {
        return partnerProductPackageMapper.queryPackageName(packageName, partnerCode);
    }

    @Override
    public String querycnyByCode(String partnerCode, String packageCode) {
        return partnerProductPackageMapper.querycnyByCode(partnerCode, packageCode);
    }

    @Override
    public String queryusdByCode(String partnerCode, String packageCode) {
        return partnerProductPackageMapper.queryusdByCode(partnerCode, packageCode);
    }

    @Override
    public String queryPackageStatusByCode(String packageCode, String partnerCode) {
        return partnerProductPackageMapper.queryPackageStatusByCode(packageCode,partnerCode);
    }

    @Override
    public void updatePackageStatus(PartnerProductPackage product) {
        partnerProductPackageMapper.updatePackageStatus(product);
    }

    @Override
    public void storageData(PartnerProductPackage product) {
        partnerProductPackageMapper.storageData(product);
    }

    @Override
    public String queryNameEnByCode(String partnerCode, String packageCode) {
        return partnerProductPackageMapper.queryNameEnByCode(partnerCode,packageCode);
    }

    @Override
    public void update_package_usage_attribute(PartnerProductPackage pro) {
        partnerProductPackageMapper.update_package_usage_attribute(pro);
    }

    @Override
    public String queryUsageAttributeByCode(String partnerCode, String packageCode) {
        return partnerProductPackageMapper.queryUsageAttributeByCode(partnerCode,packageCode);
    }
}
